public class ConcrateCreater extends Creator{

    @Override
    public <T extends Product> T createProduct(Class<T> clazz) {
        Product product;
        try{
            product = (Product) Class.forName(clazz.getName()).newInstance();
        } catch (ClassNotFoundException e) {
            throw new RuntimeException(e);
        } catch (InstantiationException e) {
            throw new RuntimeException(e);
        } catch (IllegalAccessException e) {
            throw new RuntimeException(e);
        }
        return (T)product;
    }
}
